﻿<UserControl x:Class="Apps.Yunwei.Views.ServicePanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <Style TargetType="TextBlock" BasedOn="{StaticResource DefaultTextBlock}">
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="TextAlignment" Value="Right"/>
                <Setter Property="Margin" Value="2,6,4,0" />
            </Style>
            <Style TargetType="TextBox" BasedOn="{StaticResource DefaultTextBox}">
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="Margin" Value="2,2,0,4" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" MinWidth="50"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <TextBlock Text="序号" Grid.Row="0" />
        <TextBlock Text="代码" Grid.Row="1" />
        <TextBlock Text="标题" Grid.Row="2" />
        <TextBlock Text="标签" Grid.Row="3" />
        <TextBlock Text="类型" Grid.Row="4" />
        <TextBlock Text="地址" Grid.Row="5" />
        <TextBlock Text="密钥" Grid.Row="6" />
        <TextBlock Text="图标" Grid.Row="7" />
        <TextBlock Text="背景" Grid.Row="8" />
        <TextBlock Text="前景" Grid.Row="9" />
        <TextBlock Text="描述" Grid.Row="10"/>
        <TextBlock Text="参数" Grid.Row="11"/>

        <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Order, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Code, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Caption, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Tags, Mode=TwoWay}"/>
        <ComboBox x:Name="cmbType" Grid.Column="1" Grid.Row="4" Margin="2,2,0,4" MinHeight="28"
                  DisplayMemberPath="Value" SelectedValuePath="Key"
                  SelectedValue="{Binding Type, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="5" Text="{Binding URL, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="6" Text="{Binding Token, Mode=TwoWay}"/>

        <TextBox Grid.Column="1" Grid.Row="7" Margin="2,2,80,4" Text="{Binding Icon1, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="7" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceImageClick"/>

        <TextBox Grid.Column="1" Grid.Row="8" Margin="2,2,80,4" Text="{Binding Bgc, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="8" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceBackgroundColorClick"/>

        <TextBox Grid.Column="1" Grid.Row="9" Margin="2,2,80,4" Text="{Binding Frc, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="9" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceForegroundColorClick"/>

        <TextBox Grid.Column="1" Grid.Row="10" Text="{Binding Descript, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="11" Text="{Binding Args, Mode=TwoWay}" x:Name="PARAMS"/>
    </Grid>
</UserControl>